package pub.developers.forum.api.service;

import pub.developers.forum.api.model.PageRequestModel;
import pub.developers.forum.api.model.PageResponseModel;
import pub.developers.forum.api.model.ResultModel;
import pub.developers.forum.api.request.AdminBooleanRequest;
import pub.developers.forum.api.request.article.*;
import pub.developers.forum.api.response.article.ArticleInfoResponse;
import pub.developers.forum.api.response.article.ArticleQueryTypesResponse;
import pub.developers.forum.api.response.article.ArticleUserPageResponse;
import pub.developers.forum.api.response.article.FilterArticlePageResponse;
import pub.developers.forum.api.response.inform.InformPageResponse;

import java.util.List;


public interface ArticleApiService {

    ResultModel reportReview(AdminBooleanRequest request);

    ResultModel<FilterArticlePageResponse> queryFilterPosts(PageRequestModel pageRequestModel) throws Exception;

    ResultModel<PageResponseModel<InformPageResponse>> queryReported(PageRequestModel pageRequestModel) throws Exception;

    ResultModel<List<ArticleInfoResponse>> queryBan(PageRequestModel pageRequestModel);

    ResultModel<List<ArticleQueryTypesResponse>> queryAllTypes();

    ResultModel<List<ArticleQueryTypesResponse>> queryAdminTypes();

    ResultModel<PageResponseModel<ArticleUserPageResponse>> adminPage(PageRequestModel<ArticleAdminPageRequest> pageRequestModel);

    ResultModel<List<ArticleQueryTypesResponse>> queryEditArticleTypes();

    ResultModel addType(ArticleAddTypeRequest request);

    ResultModel<Long> saveArticle(ArticleSaveArticleRequest request) throws Exception;

    ResultModel<PageResponseModel<ArticleUserPageResponse>> userPage(PageRequestModel<ArticleUserPageRequest> pageRequestModel);

    ResultModel<PageResponseModel<ArticleUserPageResponse>> authorPage(PageRequestModel<ArticleAuthorPageRequest> pageRequestModel);

    ResultModel<ArticleInfoResponse> info(Long id) throws Exception;

    ResultModel adminTop(AdminBooleanRequest booleanRequest);

    ResultModel adminOfficial(AdminBooleanRequest booleanRequest);

    ResultModel adminMarrow(AdminBooleanRequest booleanRequest);

    ResultModel<PageResponseModel<ArticleQueryTypesResponse>> typePage(PageRequestModel<ArticleAdminTypePageRequest> pageRequestModel);

    ResultModel typeAuditState(AdminBooleanRequest booleanRequest);

    //删除文章的参数
    ResultModel delete(ArticleDeleteRequest deleteRequest);


    //用户获取自己发表的所有帖子
    ResultModel<List<ArticleInfoResponse>> querySelfPosts(PageRequestModel pageRequestModel,Long userId) throws Exception;

    ResultModel<List<ArticleInfoResponse>> queryAllPosts(PageRequestModel pageRequestModel) throws Exception;

    //查询官方帖子
    ResultModel<List<ArticleUserPageResponse>> queryOfficial();
}
